import argparse
from vllm_models.qwen_vl_model import Qwen2VLModel


def main(image_path, prompt):
    model = Qwen2VLModel(model_name="Qwen/Qwen2-VL-2B-Instruct", base_url="http://10.0.102.69:8000/v1",
                         api_key="123456")
    response = model.describe_image(image_path, prompt)
    print(response)


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Qwen2-VL image description")
    parser.add_argument("--image", required=True, help="Path to the image file")
    parser.add_argument("--prompt", required=True, help="Prompt for the model")
    args = parser.parse_args()
    main(args.image, args.prompt)

# python qwen2_vl_vllm_test.py --image ../examples/09.PNG --prompt "请问我的IP地址是多少？"
